import request from "@/utils/request";

// 查询全部班级数据
export const queryAllClazzApi = () => {
  return request.get("/clazzs");
};

// 班级列表查询
export const queryDeptApi = (name, begin, end, page, pageSize) => {
  return request.get(
    `/clazzs?name=${name}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`
  );
};

// 根据ID查询
export const queryDeptByIdApi = (id) => {
  return request.get(`/clazzs/${id}`);
};

// 添加班级
export const addClazzApi = (data) => {
  return request.post("/clazzs", data);
};

// 修改班级
export const updateClazzApi = (data) => {
  return request.put("/clazzs", data);
};

// 删除班级
export const deleteClazzApi = (id) => {
  return request.delete(`clazzs/${id}`);
};
